package com.offcn.sellergood.feign;

import com.offcn.entity.Result;
import com.offcn.sellergood.entity.GoodsEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: zola
 * @Date: 2021/9/14 - 09 - 14 - 19:47
 * @Description: com.offcn.sellergood.feign
 * @Version: 1.0
 */
@FeignClient(name = "SELLGOOD-SERVICE")
public interface GoodsFeign {
    // 将GoodsController中的findById方法远程调用：目的是用于获取其中的三级标题(id)

    @GetMapping("/goods/{id}")
    public Result<GoodsEntity> findById(@PathVariable("id") Long id);

}
